
<!-- 机构下用户列表  -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	<h4 class="modal-title"><font color="red">部门用户</font>&nbsp;</h4>
</div>
<div class="modal-body">
	<form class="form-horizontal" role="form" id="deptUserForm">
		<input type="hidden" name="doCode" value="userList"/>
		<input type="hidden" name="deptId" value=""/>
		<table id="drrreptUserTable" class="table table-bordered table-hover" >
			<thead><tr>
				<th class="text_c" width="5%">序号</th>
				<th width="15%">账号</th>
				<th width="15%">姓名</th>
				<th width="15%">所属部门</th>
				<th width="5%">性别</th>
				<th width="10%">电话</th>
				<th width="10%">状态</th>
				</tr>
			</thead>
			<tbody id="deptUserList"></tbody>
		</table>
		<center><ul id="deptUserpageList"></ul></center>
	</form>
</div>
<script type="text/template" id="deptUserListData">
	  		<? for ( var i = 0; i < rows.length; i++) {?>
				<tr>
					<td class="text_c"><?=(pageObj.currentPage-1)*10+(i+1)?></td>
					<td style="display:none;"><?=rows[i].userId?></td>
					<td><?=rows[i].userEname?></td>
					<td><?=rows[i].userCname?></td>
					<td><?=rows[i].deptName?></td>
                    <td><?if(rows[i].userSex=="M"){?>女<?}else{?>男<?}?>
                    </td>
                     <td><?=rows[i].mobile?></td>
                     <td><?if(rows[i].userStatus=="1"){?>
                        <font color=blue>启用</font>
                       <?}else{?><font color=red>停用</font><?}?></td>
				</tr>
     		<?}?>
</script>
<script>
function getDeptUserListData(deptId){
	$.ajax({
		type:'get',
		url:common_list_url,
		data:$('#deptUserForm').serialize()+getCurrentPage(common_list_url+"?"+$('#deptUserForm').serialize(),10),
		dataType:'json',
		success: function(myData){
			var data = baidu.template('deptUserListData',eval(myData));  
			$("#deptUserList").html(data);
			  var option= {
				  		ele:$("#deptUserpageList")[0],
				  		total:myData.total,
				   		fn:getDeptUserListData,
				   		url:common_list_url+"?"+$('#deptUserForm').serialize()
				   }
			  generatePages(option);
		   }
		});	
  }
</script>